package cn.jinhaze.entity;

import java.util.ArrayList;
import java.util.List;

/**
 * 班级类
 *
 * @author LiZhiHan
 * @date 2025/2/20
 */
public class Clazz {

	/**
	 * 班级id
	 */
	private Long id;

	/**
	 * 班级名称
	 */
	private String clazzName;

	/**
	 * 学生集合
	 */
	private List<Student> students;

	public Clazz(Long id, String clazzName, Integer studentNum) {
		this.id = id;
		this.clazzName = clazzName;
		this.students = new ArrayList<>(studentNum);
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getClazzName() {
		return clazzName;
	}

	public void setClazzName(String clazzName) {
		this.clazzName = clazzName;
	}

	public List<Student> getStudents() {
		return students;
	}

	public void setStudents(List<Student> students) {
		this.students = students;
	}

	public void addStudent(Student student) {
		this.students.add(student);
	}
}
